<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/init.jsp"%>
<%
	String pagemodel = "AbX";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>${modelorganismprotein.taxonomic.title}</title>
<meta name="keyword" content="${modelorganismprotein.taxonomic.keyword}" />
<meta name="description" content="${modelorganismprotein.taxonomic.description}" /> 
</head>
<body><script>
	document.getElementById("Default_AbX").style.fontWeight='bold';
	document.getElementById("Default_AbX").children[0].children[0].style.color="#FF6600";
</script>
	<div class="localbar">
		<li><a href="<%=home %>" style="color:white">Home</a> > <%=pagemodel%></li>
	</div>
	<div class="contentbox">
   	  <div class="tab">                   
<a href="<%=path%>/<%=abx %>_overview.html">Overview</a> 
			<a href="<%=path%>/<%=abx %>_features.html">Features</a> 
			<a href="<%=abx %>_technology.html">Technology</a> <a href="<%=path%>/<%=abx %>_design.html">Design</a>
        </div>
        <div style="display:inline-block">
      <div class="left">
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="detailstable">
        <tr>
          <td colspan="2" class="h3"><span class="h1">Order</span></td>
        </tr>
        <tr class="tt">
          <td class="h3">Products information</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td width="26%" class="h3">Package name</td>
          <td width="74%">${abclass2product.product.name }-${modelorganismprotein.identifier } [ABX]</td>
        </tr>
        <tr class="tr2">
          <td class="h3">Description</td>
          <td>${abclass2product.product.id } antibody combinations against ${abclass2product.product.description } of ${modelorganismprotein.identifier } (${modelorganismprotein.protein_name_primary })</td>
        </tr>
        <tr>
          <td class="h3">Application</td>
          <td>AbInsure™ (+)   for ${abclass2product.end_use.name }</td>
        </tr>
        <tr class="tr2">
          <td class="h3">Price</td>
          <td>$${abclass2product.product.price_usd }</td>
        </tr>
        <tr>
          <td class="h3">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
    <form  id="check" action="">
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="detailstable">
	  <tr class="tt">
	          <td width="26%" class="h3">Please leave your information</td>
	        </tr>
	        <tr>
	          <td><label for="textfield"></label>
	          		<input name="modelorganismprotein.id"  type="text" value="${id}"style="display:none;"/>
	  		  		<input name="product"  type="text" value="${abclass2product.product.name}"style="display:none;"/>
					<input name="name" type="text" id="name" class="name"style="width:200px;" maxlength="30"/></td>
	        </tr>
	        <tr>
	          <td ><input name="email" type="text" id="email" class="email" style="width:250px;" maxlength="50"/></td>
	        </tr>
	        <tr>
	          <td ><input name="phone" type="text" id="phone" class="phone"style="width:250px;" maxlength="30"/></td>
	        </tr>
	        <tr>
	          <td class="h3"><input name="adress" type="text" id="adress" class="adress" style="width:630px;" maxlength="220"/></td>
	        </tr>
	<tr>
	<td><textarea name="message" rows="3" id="textfield5" style="width:630px;" class="message" maxlength="255"></textarea>
	<label for="textfield6"></label></td>
	</tr>
	<tr>
	<td align="center"><input type="button" class="cd-popup-trigger" name="button" id="button" onclick="post();" value="Submit Order" style="width:120px" data-reveal-id="myModal" data-animation="fade"/>
	</tr>
	      </table>
	</form>
	      </div>

			<!-- <div class="right" style="margin-top:100px">
				<div class="dashed">
					<p class="h3">Contact Us</p>
					<p>INFO</p>
				</div>
			</div> -->
		</div>
	</div>
<div class="cd-popup" role="alert">
	<div class="cd-popup-container">
		<p class="h2" style="text-align:center">Your order submitted successfully !
</p>
<p>We will send an electronic acknowledgement to the customer upon successful submission of the electronic order.</p>

		<ul class="cd-buttons">
		<li><a href="javascript:submit()">OK</a></li>
			
	</ul>
		<a href="javascript:submit()" class="cd-popup-close img-replace">Close</a>
</div> <!-- cd-popup-container -->
</div> <!-- cd-popup -->
<form id="order_form" method="post" action="<%=path%>/${modelorganismprotein.taxonomic.abstore_name}-protein-antibodies-lists_1.html" target="_self"> 
</form>
<script type="text/javascript">
function post(){
	var name=document.getElementById('name').value;
	var email=document.getElementById('email').value;
	var phone=document.getElementById('phone').value;
	var adress=document.getElementById('adress').value;
	if(name==""){
		alert("Please Write Your Name.");
		return;
	}
	if(email==""){
		return alert("Please Write Your Email.");
		return;
	}
	if(phone==""){
		return alert("Please Write Your Phone.");
		return;
	}
	if(adress==""){
		return alert("Please Write Your Adress.");
		return;
	}
	
	if(name==""||email==""||phone==""||adress==""){
		alert("Error");
	}else{
		$.ajax({
	        cache: true,
	        type: "POST",
	        url:'<%=path %>/standrad_save',
	        data:$('#check').serialize(),// 你的formid
	        async: false,
	        error: function(request) {
	            alert("Connection error");
	        },
	        success: function(data) {
	        	$('.cd-popup').addClass('is-visible');
	        }
	    });
	}
}
function submit(){
	document.getElementById('order_form').submit();
}
</script>
</body>
</html>